package com.site.springboot.core.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("tb_news_comment")
public class NewsComment {
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Long commentId;

    @TableField(value = "news_id")
    private Long newsId;

    @TableField(value = "commentator")
    private String commentator;

    @TableField(value = "comment_body")
    private String commentBody;

    @TableField(value = "comment_status")
    private Byte commentStatus;

    @JsonIgnore
    @TableLogic
    @TableField(value = "is_deleted")
    private Byte isDeleted;

    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
